//暴力清除一个范围内的敌人

params["_pos","_dis"];


//AllVehicles包含人，但是移除车辆不会移除里面的单位
private _list = _pos nearObjects ["AllVehicles", _dis];
{
	if(_x isKindOf "Man")then{
		if(!isPlayer _x && {side _x != east && {side _x != civilian}})then{ deleteVehicle _x;};
	}else{
		private _crew = crew _x;
		private _noPlayer = true;
		{
			if(isPlayer _x || {side _x == east} || {side _x == civilian}) exitWith{_noPlayer = false;};
		}forEach _crew;
		
		if(count _crew == 0) then{ _noPlayer = false};
		
		if(_noPlayer)then{
			private _veh = _x;
			{
				deleteVehicle _x;
			}forEach _crew;
			deleteVehicle _veh;
		};
	};
}forEach _list;

